<!DOCTYPE html>
<html>
<head>
    <title>物业减免统计</title>
    <#include "../common/common.ftl"/>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card" style="width: 2720px">
        <div class="layui-card-header">物业减免统计
        </div>
        <div class="layui-card-body">
            <button class="layui-btn layui-btn-bg" id="excelBtn"><i
                        class="layui-icon layui-icon-export"></i>导出Excel
            </button>
            <table id="dataTable" class="layui-table table" style="text-align: center;width: 2700px">
                <tr class="layui-bg-gray">
                    <th style="text-align: center;" rowspan="3">序号</th>
                    <th style="text-align: center;" rowspan="3">所属县市</th>
                    <th style="text-align: center;" rowspan="3">安置小区</th>
                    <td style="text-align: center;" colspan="25">
                        <span style="color: orange">2023年</span>
                        物业费减免预计金额
                        <span style="color: red">【因外部原因会实时变化】</span>
                    </td>
                </tr>
                <tr class="layui-bg-gray">
                    <#list 1..12 as t>
                        <td style="text-align: center;" colspan="2">${(t)!0}月</td>
                    </#list>
                    <td style="text-align: center;" rowspan="2">小计</td>
                </tr>
                <tr class="layui-bg-gray">
                    <#list 1..12 as t>
                        <td style="text-align: center;">减免面积</td>
                        <td style="text-align: center;background-color: #9BC2E6">金额(元)</td>
                    </#list>
                </tr>
                <#assign index = 0/>
                <#list azProjectList as azProject>
                    <#assign index = index+1 />
                    <#assign xjMoney = 0 />
                    <tr class="layui-bg-gray">
                        <td style="text-align: center;">${(index)!0}</td>
                        <td style="text-align: center;">${(townMap[azProject.town].name)!"/"}</td>
                        <td style="text-align: center;">${(azProject.projectName)!}</td>
                        <#list 1..12 as t>
                            <#assign key = azProject.id + "_" + yearNow + "_" + t />
                            <#assign xjMoney = xjMoney + (jmMap[key].monthMoney)!0 />
                            <td style="text-align: center;">
                                <a href="jmTjMx.ftl?azProjectId=${(azProject.id)!}&yearNow=${(yearNow)!}&month=${(t)!}">
                                    ${(jmMap[key].jmArea)!"/"}
                                </a>
                            </td>
                            <td style="text-align: center;background-color: #9BC2E6">
                                <a href="jmTjMx.ftl?azProjectId=${(azProject.id)!}&yearNow=${(yearNow)!}&month=${(t)!}">
                                    ${(jmMap[key].monthMoney)!"/"}
                                </a>
                            </td>
                        </#list>
                        <td style="text-align: center;color: red">${(xjMoney)!0}</td>
                    </tr>
                </#list>
            </table>
        </div>
    </div>
</div>
<script src="/layui/layui.js" charset="utf-8"></script>
<script src="/plugins/jquery/jquery.min.js" charset="utf-8"></script>
<script src="/plugins/tableExcel/jquery.table2excel.js" charset="utf-8"></script>
<script>
    layui.config({
        base: '/modules/' //静态资源所在路径
    }).use(['jquery'], function () {
        var $ = layui.jquery;

        $("#backBtn").click(function () {
            javascript:history.back(-1);
        });
    });
    $("#excelBtn").click(function () {
        $(".table").table2excel({
            exclude: ".noExl",
            name: "选房情况明细",
            filename: "选房情况明细",
            exclude_img: true,
            exclude_links: true,
            exclude_inputs: true
        });
    });
</script>
</body>
</html>